<template>
  <div class="singer-intro">
    <div>
      <h2>简介</h2>
      <div>{{ briefDesc }}</div>
    </div>
    <div>
      <div v-for="(item, index) in introductionItem" :key="index">
        <h2>{{ item.ti }}:</h2>
        <div style="white-space: pre-wrap">{{ item.txt }}</div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: ["singerId"],
  data() {
    return {
      briefDesc: "",
      introductionItem: [],
    };
  },
  created() {
    this.getData();
  },
  methods: {
    getData() {
      this.$request("get", "/artist/desc", {
        id: this.singerId,
      }).then((res) => {
        // console.log(res);
        this.briefDesc = res.briefDesc;
        this.introductionItem = res.introduction;
      });
    },
  },
};
</script>
<style scoped>
.singer-intro {
  text-align: left;
  padding: 0 1rem;
}
</style>
